<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../../vue.js"></script>
</head>

<body>
  <div id="app">

    <ul>
      <li v-for="(item,index) in cities" v-bind:key="index">
        {{item}}-{{index}}
      </li>
    </ul>

    <h1>{{user.age}}</h1>



  </div>

  <script>

    var vm = new Vue({
      el: "#app",
      data: {
        cities: ['a', 'b', 'c'],
        user: {
          username: 'hanye',
          age: ''
        }

      }
    })

    // vm.username = "hanye";
    // vm.user.age = 20;
    //  vm.$set(vm.user, 'age', 20)

//vm.$set(vm.cities, 0, 'aaaa')
//Vue.set(vm.cities,0,'aaaaaa')

  </script>

</body>

</html>